<?php defined('ByShopWWI') or exit('Access Invalid!');?>

<div class="wrap">
  <div class="tabmenu">
    <?php include template('layout/submenu'); ?>
    
  </div>
  <div class="alert">
      <span class="mr30">
          可用余额：
          <strong class="mr5 red" style="font-size: 18px;"><?php echo $output['member_info']['stock_right']; ?></strong>
          个
      </span>
     
  </div>
  <table class="ncm-default-table">
    <thead>
      <tr>
        <th class="w10"></th>
        <th class="w150 tl">创建时间</th>
        <th class="w150 tl">收入(个)</th>
        <th class="w150 tl">支出(个)</th>
        <th class="tl">变更说明</th>
      </tr>
    </thead>
    <tbody>
      <?php  if (count($output['list'])>0) { ?>
      <?php foreach($output['list'] as $v) { ?>
      <tr class="bd-line">
        <td></td>
        <td class="goods-time tl"><?php echo @date('Y-m-d H:i:s',$v['br_addtime']);?></td>
<?php $availableFloat = (int) $v['br_stock_right']; if ($availableFloat > 0) { ?>
        <td class="tl red">+<?php echo $v['br_stock_right']; ?></td>
        <td class="tl green"></td>
<?php } elseif ($availableFloat < 0) { ?>
        <td class="tl red"></td>
        <td class="tl green"><?php echo $v['br_stock_right']; ?></td>
<?php } else { ?>
        <td class="tl red"></td>
        <td class="tl green"></td>
<?php } ?>
       
        <td class="tl"><?php echo $v['br_desc'];?></td>
      </tr>
      <?php } ?>
      <?php } else {?>
      <tr>
        <td colspan="20" class="norecord"><div class="warning-option"><i>&nbsp;</i><span><?php echo $lang['no_record'];?></span></div></td>
      </tr>
      <?php } ?>
    </tbody>
    <tfoot>
      <?php  if (count($output['list'])>0) { ?>
      <tr>
        <td colspan="20"><div class="pagination"> <?php echo $output['show_page']; ?></div></td>
      </tr>
      <?php } ?>
    </tfoot>
  </table>
</div>
